#!/usr/bin/python
# -*- coding:utf-8 -*-

import MeCab
nameInputFile = 'input.txt'
nameOutputFile = 'output.txt'

input = open(nameInputFile,'r')
out = open(nameOutputFile,'w')
for line in input:
	text = line
	tagger = MeCab.Tagger("-Owakati")
	print text
	result = tagger.parse(text)
	out.writelines(result+'\n')

out.close()



print result
